package com.matrix.geo.playmysqlgeo.controller;

import com.matrix.geo.playmysqlgeo.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

@RestController
@RequestMapping("/hello")
public class HelloController {

    private final HelloService helloService;

    @Autowired
    public HelloController(
            HelloService helloService
    ) {
        this.helloService = helloService;
    }

    @GetMapping("")
    public Mono<String> sayHello() {
        return Mono.just(helloService.sayHello());
    }



}